-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Maps] Add XYZTMSSource unit test #58567
[Maps] Add XYZTMSSource unit test #58567
Conversation
@@ -4,11 +4,17 @@ | |||
* you may not use this file except in compliance with the Elastic License. | |||
*/ | |||
|
|||
import { IFieldType } from '../../../../../src/plugins/data/common/index_patterns/fields'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this import was an oversight. remove.
it('should create a tile-layer', () => { | ||
const source = new XYZTMSSource(descriptor, null); | ||
const layer: ILayer = source.createDefaultLayer(); | ||
expect(layer instanceof TileLayer).toEqual(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is more to illustrate the typing in this PR. When TileLayer
will be used in signatures in other .ts files (not yet the case), the actual type-checking will also be enforced by the compiler.
Pinging @elastic/kibana-gis (Team:Geo) |
x-pack/legacy/plugins/maps/public/layers/sources/xyz_tms_source.test.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for starting the typings of Layer and Source. These are going to be a ton of work and this is a great way to get them going.
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for starting the types for Layer and Source
LGTM
code review
This adds unit tests for the XYZTMSSource.
It also introduces the boilerplate for the type-declaration files of two core components in Maps.
ISource
ILayer
and some of their dependencies.
This will also help condense the #57879 PR, as that one will extend the object model.